package com.zxt.service.impl;

import com.zxt.dao.AddressDao;
import com.zxt.dao.impl.AddressDaoImpl;
import com.zxt.domain.Address;
import com.zxt.service.AddressService;

import java.util.List;

public class AddressServiceImpl implements AddressService {
    private AddressDao addressDao=new AddressDaoImpl();
    @Override
    public List<Address> find(Integer uid) {
        return addressDao.select(uid);
    }

    @Override
    public void add(Address address) {
     addressDao.insert(address);
    }

    @Override
    public void remove(Integer uid, Integer aid) {
        addressDao.delete(uid,aid);
    }

    @Override
    public void updateLevel(Integer uid, Integer aid) {
        addressDao.updateLevel(uid,aid);
    }

    @Override
    public void update(Address address) {
        addressDao.update(address);
    }
}
